Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent anyone from accidentally setting the blocksize to zero #197

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

deitch
Copy link
Contributor

@deitch deitch commented Nov 10, 2020

Although we do have a default, in theory, but if someone actually calls: WithBlocksize(0), it will override the default, and break all sorts of things. This adds a safety check.

pkg/content/opts.go Outdated Show resolved Hide resolved
@jdolitsky jdolitsky merged commit f1caa17 into oras-project:master Nov 10, 2020
@deitch deitch deleted the safety-check branch November 10, 2020 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants